﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x02000040 RID: 64
	public class SingleFormatter : IMessagePackFormatter<float>
	{
		// Token: 0x060000EF RID: 239 RVA: 0x00004673 File Offset: 0x00002A73
		private SingleFormatter()
		{
		}

		// Token: 0x060000F0 RID: 240 RVA: 0x0000467B File Offset: 0x00002A7B
		public int Serialize(ref byte[] bytes, int offset, float value, IFormatterResolver formatterResolver)
		{
			return MessagePackBinary.WriteSingle(ref bytes, offset, value);
		}

		// Token: 0x060000F1 RID: 241 RVA: 0x00004685 File Offset: 0x00002A85
		public float Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize)
		{
			return MessagePackBinary.ReadSingle(bytes, offset, out readSize);
		}

		// Token: 0x04000034 RID: 52
		public static readonly SingleFormatter Instance = new SingleFormatter();
	}
}
